/** 公共接口 **/
import { base_url } from '../request.config';

const tencentApi = {
    is_pastdue: '', //验证公众号是否过期

    get_impower: 'thanos/wechat/preAuthInfo', //获取授权地址
    callback_impower: 'thanos/wechat/authCallBack', //授权回调
    tencent_detail: 'thanos/wechat/authInfo', //公众号详情
    relieve_impower: 'thanos/wechat/cancelAuth', //解除授权
    bind_cabinet_count: 'thanos/wechat/cabNumber', //绑定数量 根据type: 1、柜子；2、老货架；3、新货架

    user_info: 'thanos/wechat/countUser', //获取用户概况数据
    user_list: 'thanos/wechat/userByList', //用户概况列表

    cabinet_list: 'thanos/wechat/cab/all', //获取可绑定柜体列表
    shelf_list: 'thanos/wechat/shelf/all', //获取可绑定货架列表
    unbundle_cabinet: 'thanos/wechat/cabUnbind', //解绑柜体
    bundle_cabinet: 'thanos/wechat/cabAdd', //绑定柜体、货架  type:  1柜子；2老货架；3新货架
    cabinet_alllist: 'thanos/wechat/cabList', // 查询柜体列表
    shelf_allList: 'thanos/wechat/shelfList', // 查询货架列表


    impower_list: 'thanos/wechat/authList', //公众号授权列表
    bind_cabinet_list: 'thanos/wechat/allCabList' //绑定柜体的数量
};

const tencent: any = Object.keys(tencentApi)
    .reduce((origin, item) => {
        origin[item] = `${base_url}/${tencentApi[item]}`;
        return origin;
    }, {})

export default tencent;
